<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>后台管理系统</title>
    <link rel="stylesheet" th:href="@{/static/element-plus/index.css}">
    <style>
        body {
            margin: 0;
            padding: 0;
            font-family: Arial, sans-serif;
        }
        .app-container {
            display: flex;
            min-height: 100vh;
        }
        .sidebar {
            width: 220px;
            background-color: #001529;
            color: white;
            transition: width 0.3s;
        }
        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
        }
        .header {
            height: 60px;
            background-color: white;
            box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
        }
        .content {
            flex: 1;
            padding: 20px;
            background-color: #f0f2f5;
        }
        .logo {
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            font-weight: bold;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        .menu {
            padding: 10px 0;
        }
        .user-info {
            display: flex;
            align-items: center;
        }
        .username {
            margin-left: 10px;
        }
    </style>
</head>
<body>
<div id="app">
    <div class="app-container">
        <!-- 侧边栏 -->
        <div class="sidebar">
            <div class="logo">后台管理系统</div>
            <div class="menu">
                <el-menu
                        default-active="1"
                        class="el-menu-vertical"
                        background-color="#001529"
                        text-color="#fff"
                        active-text-color="#ffd04b"
                        router
                        @select="handleMenuSelect">
                    <el-menu-item index="/welcome">
                        <i class="el-icon-menu"></i>
                        <span>欢迎页</span>
                    </el-menu-item>
                    <el-sub-menu index="2">
                        <template #title>
                            <i class="el-icon-setting"></i>
                            <span>系统管理</span>
                        </template>
                        <el-menu-item index="2-1">用户管理</el-menu-item>
                        <el-menu-item index="2-2">角色管理</el-menu-item>
                        <el-menu-item index="2-3">菜单管理</el-menu-item>
                    </el-sub-menu>
                </el-menu>
            </div>
        </div>

        <!-- 主内容区 -->
        <div class="main-content">
            <!-- 顶部导航 -->
            <div class="header">
                <div></div>
                <div class="user-info">
                    <el-dropdown @command="handleCommand">
                            <span class="el-dropdown-link">
                                <el-avatar :size="30" src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png"></el-avatar>
                                <span class="username">Admin</span>
                            </span>
                        <template #dropdown>
                            <el-dropdown-menu>
                                <el-dropdown-item command="profile">个人中心</el-dropdown-item>
                                <el-dropdown-item command="logout">退出登录</el-dropdown-item>
                            </el-dropdown-menu>
                        </template>
                    </el-dropdown>
                </div>
            </div>

            <!-- 内容区 -->
            <div class="content">
                <router-view></router-view>
            </div>
        </div>
    </div>
</div>
<script th:src="@{/static/js/vue.global.js}"></script>
<script th:src="@{/static/element-plus/index.full.js}"></script>
<script th:src="@{/static/element-plus/zh-cn.js}"></script>
<script th:src="@{/static/js/axios.min.js}"></script>
<script th:src="@{/static/js/app.js}"></script>
<script>

</script>
</body>
</html>